package fy.rest;

import com.seeyon.client.CTPRestClient;
import com.seeyon.client.CTPServiceClientManager;

final class RestClientCreator {
	public static CTPRestClient createRestClient() {
		CTPServiceClientManager clientManager = CTPServiceClientManager
				.getInstance("http://127.0.0.1:80");
		// 取得REST动态客户机实例
		CTPRestClient client = clientManager.getRestClient();
		client.authenticate("fy_form_reader", "form_reader2015");
                
		return client;
	}
        public static CTPRestClient createRestClient(String url) {
		CTPServiceClientManager clientManager = CTPServiceClientManager
				.getInstance(url);
		// 取得REST动态客户机实例
		CTPRestClient client = clientManager.getRestClient();
		client.authenticate("fy_form_reader", "form_reader2015");
                
		return client;
	}
}
